package com.calvin.study.proxy.dynamicproxy.cglib;

public class Client {

	public static void main(String[] args) {
		// 1.创建目标对象
		TeacherDao target = new TeacherDao();
		// 2.获取到代理对象,并且将目标对象传递给代理
		TeacherDao proxyInstance = (TeacherDao) new ProxyFactory(target).getProxyInstance();
		System.out.println(proxyInstance.getClass());
		
		proxyInstance.teach("数学课");
	}

}
